package com.ww.juc.completable.future.effect;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

public class MyCallable implements Callable<String> {
	
	private String username;
	
	private long sleepValue;
	
	public MyCallable(String username, long sleepValue) {
		super();
		this.username = username;
		this.sleepValue = sleepValue;
	}

	@Override
	public String call() throws Exception {
		System.out.println(username);
		TimeUnit.MILLISECONDS.sleep(sleepValue);
		return "return " + username;
	}

}
